window.onload = function () {
	//判断是否有权限
	axios
		.get("https://ty.php800.cn/api/token.php", {
			headers: {
				TOKEN: `${localStorage.getItem("token")}`,
				SAT: "1234567",
			},
		})
		.then((result) => {
			let { verify } = result.data;
			if (!verify) {
				location.href = "login.html";
			}
		})
		.catch((err) => console.log(err));
	//下拉框
	(function dropmune() {
		let item_drops = document.querySelectorAll(".item_drop");
		item_drops.forEach((item) => {
			item.addEventListener("click", function () {
				if (this.classList[1] === undefined) {
					item_drops.forEach((el) => {
						el.classList.remove("drop");
					});
					this.classList.add("drop");
				} else {
					this.classList.remove("drop");
				}
			});
		});
	})();
	class Member {
		constructor() {}
		chege_ifarm(el, url) {
			document.querySelector(el).addEventListener("click", () => {
				document.querySelector("iframe").src = url;
			});
		}
	}

	let member = new Member();
};
